# -*- coding:utf-8 -*-
# 控制流

# if 测试
x = int(input("please input a int:"))
if x < 0:
    x = 0
    print("x < 0 so change to 0")
elif 0 == x:
    print("input num is 0")
elif x > 0:
    x = 1
    print("x > 0 so change to 1")

# for 测试
words = ['a','c','b']
for w in words:
    print(w)

words = ['a', 2, 3]
for w in words[:]:
    if 'a' == w:
        words.insert(0, 1)
print(words)
# [1, 'a', 2, 3]

for i in range(3):
    print(i)

# 链表索引 测试
words = ['h', 'e', 'l', 'l', 'o']
for i in range(len(words)):
    print(i, words[i])


# else 测试
for i in range(2):
    print(i)
    # break
    # continue
else:
    print('done')
